package cn.com.surker.base.strength.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 强度等级表
 * </p>
 *
 * @author admin
 * @since 2024-07-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class BaseStrength extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 强度等级名称
     */
    @NotNull(message = "强度等级全称不能为空")
    private String strength;

    /**
     * 强度等级
     */
    private String level;
    /**
     * 基础强度等级ID
     */
    @NotNull(message = "请选择标号基础等级")
    private Long levelId;

    /**
     * 构件类型(-1:混凝土，0：叠合板，1：柱子，2：楼梯，3：圆墩，4：飘窗)
     */
    private Integer MemberType;

    /**
     * 强度等级类型 0混凝土 1砂浆
     */
    @NotNull(message = "请选择标号类型")
    private Integer type;

    /**
     * 材料要求
     */
    private String materialRequirement;

    /**
     * 技术要求
     */
    private String technologyRequirement;

    /**
     * 工艺要求
     */
    private String craftRequirement;
    /**
     * 抗渗透性
     */
    private String permeability;

    /**
     * 是否常用(0:否1:是)
     */
    private Integer isUse;
    /**
     * 抗折性
     */
    private String bending;
    /**
     * 抗冻性
     */
    private String freeze;

    /**
     * 特性类型(0:抗渗，1：特殊材料，2：特殊项目，3：抗冻，4：抗折，)
     */
    private Integer specialType;

    /**
     * 销售运输补贴类型(TransportSubsidyAdditionalEnum)
     */
    private Integer saleSubsidyType;

    /**
     * 是否显示(0:是1:否)
     */
    private Integer isDisplay;

    /**
     * 容重
     */
    private Double dosage;

    /**
     * 货物运输类型
     */
    private Integer transportType;

    /**
     * 强度等级
     */
    @TableField(exist = false)
    private String levelName;

    /**
     * 类型
     */
    @TableField(exist = false)
    private Integer levelType;

    public BaseStrength(){}
    public BaseStrength(String strength, String level, String materialRequirement, String technologyRequirement,
                        String craftRequirement, Integer specialType, Integer isDisplay, Integer status,
                        String remark, String creator, Date createTime, Double dosage,
                        String permeability, String bending, String freeze) {
        this.strength = strength;
        this.level = level;
        this.materialRequirement = materialRequirement;
        this.technologyRequirement = technologyRequirement;
        this.craftRequirement = craftRequirement;
        this.specialType = specialType;
        this.isDisplay = isDisplay;
        this.status = status;
        this.remark = remark;
        this.creator = creator;
        this.createTime = createTime;
        this.dosage = dosage;
        this.permeability=permeability;
        this.bending = bending;
        this.freeze = freeze;
    }

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		if (!super.equals(o)) return false;
		BaseStrength strength = (BaseStrength) o;
		return Objects.equals(getId(), strength.getId());
	}

	@Override
	public int hashCode() {
		return Objects.hash(super.hashCode(), getId());
	}
}
